package com.qmhl.toolposition.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.qmhl.toolposition.api.content.Friend
import com.qmhl.toolposition.api.content.FriendListResponse
import com.qmhl.toolposition.bean.CareBean
import com.qmhl.toolposition.databinding.ItemCareBinding

class CareAdapter() :
    BaseQuickAdapter<Friend, CareAdapter.VH>() {

    lateinit var mBinding: ItemCareBinding

    // 自定义ViewHolder类
    class VH(
        parent: ViewGroup,
        val binding: ItemCareBinding = ItemCareBinding.inflate(
            LayoutInflater.from(parent.context), parent, false
        )
    ) : RecyclerView.ViewHolder(binding.root)

    override fun onBindViewHolder(holder: VH, position: Int, item: Friend?) {
        holder.binding.tvPositionInfo.text = item?.lastAddress
        holder.binding.tvPhone.text = item?.nickname
        holder.binding.tvTime.text = item?.dateStr


    }


    override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): VH {
        return VH(parent)
    }


}